<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
    <head>
        <title>org.gephi.io.exporter.api</title>
    </head>
    <body>
        <p>
            API for exporting data to any support. The API supports File, Writer and
            OutputStream.
        </p>
        <h3>How to export a graph file</h3>
        <pre>
ExportController ec = Lookup.getDefault().lookup(ExportController.class);
ec.exportFile(new File("export.gexf"));
        </pre>
        <h3>How to export to a String</h3>
        <pre>
ExportController ec = Lookup.getDefault().lookup(ExportController.class);
Exporter exporter = ec.getExporter("gexf");
CharacterExporter characterExporter = (CharacterExporter)exporter;
StringWriter stringWriter = new StringWriter();
ec.exportWriter(stringWriter, characterExporter);
String result = stringWriter.toString();
        </pre>
    </body>
</html>